SpdrRiskCounter
Values in this table represent current (live) SpiderRock supervisory risk counters for a corresponding risk control key.
METADATA
Attribute | Value |
---|---|
Topic | 4625-risk-counter |
MLink Token | SystemData |
Product | SRControl |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | ANYANY represents the entire control group |
ticker_ts | enum - TickerSrc | PRI | 'None' | ANYANY represents the entire control group |
ticker_tk | VARCHAR(12) | PRI | '' | ANYANY represents the entire control group |
riskControlKey | VARCHAR(64) | PRI | '' | must be an SRClientAccnt if riskControlLevelAccnt must be an SRUser if riskControlLevelUser ignored if riskControlLevelClientFirm |
riskControlLevel | enum - RiskControlLevel | PRI | 'None' | |
riskFirm | VARCHAR(16) | PRI | '' | |
isTestAccnt | enum - YesNo | PRI | 'None' | |
sysRealm | enum - SysRealm | 'None' | ||
sysEnvironment | enum - SysEnvironment | 'None' | original source sys environment Stable Current etc | |
riskEngine | VARCHAR(32) | '' | EE engine name | |
netDayDDelta | FLOAT | 0 | net day Delta | |
absDayDDelta | FLOAT | 0 | absolute day Delta ddBot ddSld position | |
netDayVega | FLOAT | 0 | net day Vega per | |
absDayVega | FLOAT | 0 | absolute day Vega veBot veSld position | |
netDayWtVega | FLOAT | 0 | net day WtVega | |
absDayWtVega | FLOAT | 0 | absolute day WtVega wvBot wvSld position | |
netDayNValue | FLOAT | 0 | net day Notional Value | |
absDayNValue | FLOAT | 0 | absolute day Notional Value nvBot nvSld position | |
netDayRMetric7 | FLOAT | 0 | net day RiskMetric7 | |
absDayRMetric7 | FLOAT | 0 | absolute day RiskMetric7 rm7Bot rm7Sld position | |
netDayDDeltaEma | FLOAT | -1 | 60s halflife EMA delta | |
netDayWtVegaEma | FLOAT | -1 | 60s halflife EMA wtVega | |
emaTimestamp | DOUBLE | 0 | ||
liveMarginDay | FLOAT | 0 | live net per symbol day portfolio day trades only margin can include external sources | |
liveOpenExposure | FLOAT | 0 | live abs open child order Delta no netting open child orders only | |
dayMarginUDnVDn | FLOAT | 0 | day margin UPrcDnVolDn | |
dayMarginUDnVUp | FLOAT | 0 | day margin UPrcDnVolUp | |
dayMarginUUpVDn | FLOAT | 0 | day margin UPrcUpVolDn | |
dayMarginUUpVUp | FLOAT | 0 | day margin UPrcUpVolUp | |
numStkChildOrders | INT | 0 | ||
numFutChildOrders | INT | 0 | ||
numOptChildOrders | INT | 0 | ||
numMLegChildOrders | INT | 0 | ||
counter | INT | 0 | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
riskControlKey | 4 |
riskControlLevel | 5 |
riskFirm | 6 |
isTestAccnt | 7 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgSRRiskCounter` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT '''*-ANY-ANY'' represents the entire control group',
`riskControlKey` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'must be an SRClientAccnt if riskControlLevel=Accnt; must be an SRUser if riskControlLevel=User; ignored if riskControlLevel=ClientFirm',
`riskControlLevel` ENUM('None','ClientFirm','Accnt','User') NOT NULL DEFAULT 'None',
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`sysRealm` ENUM('None','SysTest','NMS','CME','FR2','LD4','DR') NOT NULL DEFAULT 'None',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`riskEngine` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'EE engine name',
`netDayDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day $Delta',
`absDayDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day $Delta, |ddBot| + |ddSld| position',
`netDayVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day Vega per',
`absDayVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day Vega, |veBot| + |veSld| position',
`netDayWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day WtVega',
`absDayWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day WtVega, |wvBot| + |wvSld| position',
`netDayNValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day Notional Value',
`absDayNValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day Notional Value, |nvBot| + |nvSld| position',
`netDayRMetric7` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day RiskMetric7',
`absDayRMetric7` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day RiskMetric7, |rm7Bot| + |rm7Sld| position',
`netDayDDeltaEma` FLOAT NOT NULL DEFAULT -1 COMMENT '60s (half-life) EMA $delta',
`netDayWtVegaEma` FLOAT NOT NULL DEFAULT -1 COMMENT '60s (half-life) EMA wtVega',
`emaTimestamp` DOUBLE NOT NULL DEFAULT 0,
`liveMarginDay` FLOAT NOT NULL DEFAULT 0 COMMENT 'live net (per symbol) day portfolio (day trades only) margin (can include external sources)',
`liveOpenExposure` FLOAT NOT NULL DEFAULT 0 COMMENT 'live abs open child order $Delta (no netting) (open child orders only)',
`dayMarginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolDn)',
`dayMarginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolUp)',
`dayMarginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolDn)',
`dayMarginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolUp)',
`numStkChildOrders` INT NOT NULL DEFAULT 0,
`numFutChildOrders` INT NOT NULL DEFAULT 0,
`numOptChildOrders` INT NOT NULL DEFAULT 0,
`numMLegChildOrders` INT NOT NULL DEFAULT 0,
`counter` INT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`riskControlKey`,`riskControlLevel`,`riskFirm`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Values in this table represent current (live) SpiderRock supervisory risk counters for a corresponding risk control key.';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`riskControlKey`,
`riskControlLevel`,
`riskFirm`,
`isTestAccnt`,
`sysRealm`,
`sysEnvironment`,
`riskEngine`,
`netDayDDelta`,
`absDayDDelta`,
`netDayVega`,
`absDayVega`,
`netDayWtVega`,
`absDayWtVega`,
`netDayNValue`,
`absDayNValue`,
`netDayRMetric7`,
`absDayRMetric7`,
`netDayDDeltaEma`,
`netDayWtVegaEma`,
`emaTimestamp`,
`liveMarginDay`,
`liveOpenExposure`,
`dayMarginUDnVDn`,
`dayMarginUDnVUp`,
`dayMarginUUpVDn`,
`dayMarginUUpVUp`,
`numStkChildOrders`,
`numFutChildOrders`,
`numOptChildOrders`,
`numMLegChildOrders`,
`counter`,
`timestamp`
FROM `SRControl`.`MsgSRRiskCounter`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(64) */
`riskControlKey` = 'Example_riskControlKey'
AND
/* Replace with a ENUM('None','ClientFirm','Accnt','User') */
`riskControlLevel` = 'None'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='SpdrRiskCounter' ORDER BY ordinal_position ASC;